package com.shenghua.dao.plugin;

import org.mybatis.generator.api.ShellRunner;

/**
 * Created by Administrator on 2018/12/16.
 */
public class MyBatisGenerator {
    public static void main(String[] args) {

        String config = MyBatisGenerator.class.getClassLoader().getResource("generatorConfig.xml").getFile();
        System.out.println(config);
        String[] arg = { "-configfile", config, "-overwrite" };
        ShellRunner.main(arg);
        System.out.println("generate success!");
    }
}
